package com.kly.order.db.dao;

import com.fqgj.common.base.BaseMapper;
import com.kly.order.db.entity.TOrderEntity;

import java.util.List;

public interface TOrderDao extends BaseMapper<TOrderEntity> {

    int updateByOrderNo(TOrderEntity params);

    List<TOrderEntity> selectByToken(String purchaseToken, String appCode);

    TOrderEntity queryLatestSubscriptionsOrderByUserCode(String userCode);

    TOrderEntity selectLatestOrderByToken(String purchaseToken);

    TOrderEntity selectPaidOrderByPurchase(String userCode, Integer purchaseType);

    TOrderEntity queryByOrderNo(String orderNo);

    List<TOrderEntity> listPaidOrder();

    Integer countByStatus(String userCode, Integer status);

}